﻿using NursingFormSystem.Common;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Xml;

namespace NursingFormSystem.Version
{
    public partial class Helper : Form
    {
        public Helper(string[] UserParam)
        {
            InitializeComponent();
        }
        private void Helper_Load(object sender, EventArgs e)
        {
            lblVersion.Text = GetVersion();
        }
        public static String GetVersion()
        {
            string file = System.Windows.Forms.Application.StartupPath + "\\updateconfiguration.config";//读取文件
            string[] strs = File.ReadAllLines(file);
            string[] applicationUpdater = strs[1].Split(' ').ToArray();
            string[] version = applicationUpdater[3].Split('=').ToArray();
            string v = version[1].Replace('"', ' ');
            return v;
        }
    }
}
